class StringDemo:
    def _test_str(self):
        """
        sd = StringDemo()
        sd._test_str()
        """
        str = '人生'
        print('字符串的编码类型: ', type(str.encode()))
        print('字符串的编码值: ', str.encode())


if __name__ == '__main__':
    sd = StringDemo()
    sd._test_str()
